<template>
	<view>
		<!-- <view class="gradient-bg"></view> -->
		<!-- <view :class="['navbar',isScroll === true ? 'nav-fixed':'nav-normal']" :style="{ 'height': navheight +parseInt(slotheight)+ 'px' ,'background-color' : bgcolor}">
			<view :style="{ 'height': navheight + 'px' ,'background-color' : bgcolor}">
				<view :style="{'height': statusBarHeight +'px'}"></view>
				<view class="header" @click="getTool" :style="{'height': menuHeight +'px'}">
					<view class="hearder-status">
						<view class="nav-btn" :style="{'width':btnWidth + 'px','height': btnHeight + 'px', 'color': toolcolor}">
							<view style="width: 50rpx;font-weight: 500;height: 50rpx;position: relative;" >
								<text class="iconfont icon-xiangzuo" style="font-size: 40rpx;color: #ffffff;position: absolute;top: 50%;left: 50%;transform: translate(-50%,-50%);"></text>
							</view>
						</view>
					</view>
					<view>完善个人信息</view>
				</view>
			</view>
		</view> -->
		<headerNav :navRightIcon="false" bgColor="#1FB0AD" leftIconColor="#fff" :title="navTitle" titleColor="#fff" />
		<template v-if="false">
			<view class="box" v-if="isUserInfo === 2">
				<view class="wen">
					您的基本信息
				</view>
			</view>
			<view class="box" v-else-if="isUserInfo === 1">
				<view class="wen">
					请完善您的个人信息
				</view>
				<view class="zi">
					以便于更好的给您提供个性化服务
				</view>
			</view>
		</template>
		<view class="box1 prow30">
			<view class="prow30 bg-white rounded-20 relative_1 pt20">
				<view class="flex justify-between items-center pt36 pb36 bb_gray_2">
					<view style="color: #242935;position: relative;" class="name">
						头像
					</view>
					<!--  #ifdef APP-PLUS || H5 -->
					<view @click="chooseImage" class="flex items-center justify-center relative">
						<template v-if="uploadImgUrl">
							<image :src="uploadImgUrl" style="width: 120rpx;height: 120rpx;">
							</image>
						</template>
						<text v-else class="fs28 c999">上传头像</text>
						<u-icon class="right_icon" name="arrow-right" color="#666" size="16"></u-icon>
					</view>
					<!-- #endif -->
					<!-- #ifdef MP-WEIXIN -->
					<button class="avatar-wrapper" hover-class="none" open-type="chooseAvatar"
						style="position: relative;" @chooseavatar="onChooseAvatar">
						<image class="avatar" :src="uploadImgUrl"></image>
						<!-- <image src="../../static/tubiao/xiangji.png" style="width: 40rpx;height: 40rpx;display: block;position: absolute;bottom: 0;right: 0;z-index: 100;"></image> -->
					</button>
					<!-- #endif -->
				</view>
				<view class="hang flex items-center justify-between bb_gray_2">
					<view class="name">
						姓名
					</view>
					<input type="nickname" v-model="name" class="name_input" placeholder="请输入姓名"
						placeholder-class="zhi" />
				</view>
				<view class="hang bb_gray_2">
					<view class="name">
						性别
					</view>
					<view class="flex items-center">
						<view class="flex items-center" style="margin-right: 30rpx;flex: 1;border-radius: 50rpx;"
							@click="tp_lx(1)">
							<image :src="gender==1?xz:wxz"
								style="width: 30rpx;height: 30rpx;display: block;margin-right: 20rpx;" mode=""></image>
							<text class="fs28">男</text>
						</view>
						<view class="flex items-center" style="flex: 1;border-radius: 50rpx;padding-left: 20rpx;"
							@click="tp_lx(2)">
							<image :src="gender==2?xz:wxz"
								style="width: 30rpx;height: 30rpx;display: block;margin-right: 20rpx;" mode=""></image>
							<text class="fs28">女</text>
						</view>
					</view>
				</view>
				<view class="hang bb_gray_2">
					<view class="name">
						联系方式
					</view>
					<view style="position: relative;">
						<!-- <input type="text" v-if="mobile" v-model="mobile" class="name_input" :disabled="true" placeholder="请输入您的联系电话" placeholder-class="zhi" /> -->
						<text v-if="mobile2" class="fs28 c999">{{hideMobile(mobile2)}}</text>
						<input v-else type="text" v-model="mobile" class="name_input" placeholder="请输入您的联系电话"
							placeholder-class="zhi" />
						<button v-if="!mobile && false" class="shou" @getphonenumber="login1"
							style="background-color: #1fb0ac;color: #FFFFFF;position: absolute;top: 50%;right: 30rpx;transform: translateY(-50%);"
							open-type="getPhoneNumber">授权手机号</button>
					</view>
				</view>
				<view class="hang">
					<view></view>
					<view class="flex items-center" style="position: relative;">
						<text class="fs28 text-666">是否展示我的联系方式</text>
						<switch style="transform:scale(0.7)" color="#1fb0ac" :checked="gun_code==1"
							@change="gun_switch1Change" />
					</view>
				</view>
			</view>
			<view class="prow30 bg-white rounded-20 relative_1 mt30">
				<view class="hang bb_gray_2">
					<view class="name">
						公司名称
					</view>
					<input v-model="mingcheng" @blur="gong" type="text" class="name_input" placeholder="请输入公司名称"
						placeholder-class="zhi" />
					<!-- <input v-model="position" style="margin-top: 20rpx;" type="text" class="name_input"   placeholder="您的职位" placeholder-class="zhi" />
					<view style="position: relative;" @click="shenfen">
						<input  :disabled="true" style="padding-right: 80rpx;" v-model="l_zhiwei" type="text" class="name_input wei"   placeholder="身份" placeholder-class="zhi" />
						<image src="https://frozen-info.oss-cn-shanghai.aliyuncs.com/uploads/miniapp/toright333.png" style="position: absolute;top: 50%;right: 44rpx;transform: translateY(-50%);width: 15rpx;height: 20rpx;" mode=""></image>
					</view> -->

				</view>
				<view class="hang bb_gray_2">
					<view class="name">
						公司职位
					</view>
					<input v-model="position" type="text" class="name_input"
						placeholder="请输入公司职位" placeholder-class="zhi" />
				</view>
				<view class="bb_gray_2 pb20" @click="shenfen">
					<view class="flex justify-between items-center pt36 pb10">
						<view class="name">
							企业类型
						</view>
						<view class="relative flex items-center">
							<text class="fs28 c-999">身份</text>
							<u-icon class="right_icon" name="arrow-right" color="#666" size="16"></u-icon>
							<!-- <image class="right_icon" src="https://frozen-info.oss-cn-shanghai.aliyuncs.com/uploads/miniapp/toright333.png" mode=""></image> -->
						</view>
					</view>
					<view v-if="xin_list_arr.length>0" style="overflow: hidden;margin-top: 20rpx;" class="pp_box">
						<view class="qbpp_ac" v-for="(item,index) in xin_list_arr" :key='index'
							style="height: 70rpx;line-height: 70rpx;border-radius: 35rpx;font-size: 28rpx;float: left;width: 142rpx;box-sizing: border-box;padding: 0 4rpx;text-align: center;">
							{{item.title}}
						</view>
					</view>
				</view>
				<view class="bb_gray_2 pb24" @click="fanwei">
					<view class="flex justify-between items-center pt36 pb10">
						<view class="name">
							经营范围
						</view>
						<view class="relative  flex items-center">
							<text class="fs28 c-999">经营品类</text>
							<u-icon class="right_icon" name="arrow-right" color="#666" size="16"></u-icon>
						</view>
					</view>
					<view class="pt20" v-if="fanwei_list.length>0" style="overflow: hidden;">
						<text v-for="(item,index) in fanwei_list" :key='index'>
							<text
								style="float: left;line-height: 60rpx;height: 60rpx;padding: 0 30rpx;margin: 0 16rpx 16rpx 0;font-size: 26rpx;color: #333333;background-color: #F3F3F3;border-radius: 30rpx;">
								{{item.one}}-
								<text v-if="item.two!=''">{{item.two}}</text>
								<text v-if="item.two==''">全部</text>
								<!-- <text v-if="item.three!=''">-{{item.three}}</text>
								<text v-if="item.three==''">-全部</text> -->
							</text>
						</text>
					</view>
					<view v-if="qita!=''">
						<view
							style="line-height: 80rpx;color: #000000;font-size: 28rpx;font-weight: 600;width: 100%;margin: 0 auto;">
							补充经营品类
						</view>
						<textarea
							style="width: 100%;padding: 20rpx;box-sizing: border-box;line-height: 40rpx;font-size: 26rpx;background-color: #F3F3F3;margin:0 0 20rpx;border-radius: 10rpx;height: 200rpx;"
							v-model="qita" placeholder="" />
					</view>
					<!-- <view style="line-height: 50rpx;color: #000000;font-size: 30rpx;border-bottom: 1px solid #eeeeee;margin: 10rpx 0;" >
						{{qita}}
					</view> -->
				</view>
				<view class="relative pb30">
					<view class="flex justify-between items-center pt36 pb10">
						<view class="name">
							企业地址
						</view>
						<!-- #ifdef MP-WEIXIN -->
						<picker class="picker" mode="region" @change="location">
							<view class="change" style="text-align: left;">
								<text class="text-999 fs28" v-if="!address">选择省/市/区</text>
								<text v-else>{{address || ''}}</text>
								<u-icon class="right_icon" name="arrow-right" color="#666" size="28"></u-icon>
							</view>
						</picker>
						<!-- #endif -->
						<!-- #ifdef APP-PLUS || H5 -->
						<!-- <pickAdress/> -->
						<view class="change relative flex items-center" @tap="open">
							<view class="text-999 fs28" v-if="!address">选择省/市/区</view>
							<view v-else class="text-333 fs28">{{address || ''}}</view>
							<u-icon class="right_icon" name="arrow-right" color="#666" size="16"></u-icon>
						</view>
						<!-- <text @tap="open" v-if="!address">选择省/市/区1</text> -->
						<!-- #endif -->
					</view>
					<input v-model="xxaddress" type="text" class="name_input1 wei mt20" placeholder="公司详细地址"
						placeholder-class="zhi" />
				</view>
			</view>
			<view class="prow30 bg-white rounded-20 relative_1 mt30 pb30">
				<view class="name pb20 pt30">
					您的个人介绍
				</view>
				<textarea placeholder-style="font-size:28rpx;"
					style="background-color: #eeeeee;width: 100%;border-radius: 10rpx;padding: 20rpx;box-sizing: border-box;"
					placeholder="请填写个人介绍" v-model="geren" />
			</view>
			<view class="moren">
				<label>
					<checkbox :disabled="true" :checked="true" style="transform:scale(0.7);color: #1fb0ac;" />
					<text>我已阅读并同意</text>
				</label>
				<text @click="rzxz" style="color: #1fb0ac;">⟪个人信息收集须知⟫</text>
			</view>
			<button :disabled="xu" class="jixu" :style="{'backgroundColor': xu?'#555555':'#1fb0ac'}" @click="jixu">
				确定
			</button>
		</view>
		<!-- <view class="wanshan">
			信息完善后将赠送您3天的会员体验权限
		</view>
		<view class="tiaoguo" @click="tiaoguo">
			跳过
		</view> -->
		<uni-popup id="popup" ref="popup" :type="type_a" :animation="true">
			<view class="" style="background-color: #FFFFFF;padding:20upx 30upx;border-radius: 20upx;width: 500rpx;">
				<view
					style="text-align: center;height: 100upx;line-height: 100upx;color: #333333;font-weight: 600;font-size: 32rpx;">
					个人信息收集须知
				</view>
				<scroll-view scroll-y="true" style="height: 400rpx;margin-bottom: 20rpx;">
					<view style="line-height: 50rpx;color: #606266;font-size: 24rpx;" v-html="rule">

					</view>
				</scroll-view>
				<view @click="guan"
					style="width: 100%;height: 80rpx;line-height: 80rpx;background-color: #1fb0ac;border-radius: 40rpx;color: #FFFFFF;font-size: 30rpx;text-align: center;">
					确定
				</view>
			</view>
		</uni-popup>
		<uni-popup id="popup" ref="popup2" :type="type_a" :animation="true">
			<view class="relative"
				style="background-color: #FFFFFF;padding:20upx;border-radius: 20upx;width: 88%;margin: 0 auto;box-sizing: border-box;">
				<view
					style="text-align: center;height: 100upx;line-height: 100upx;color: #222222;font-size: 32rpx;font-family: Semibold;">
					企业身份选择
				</view>
				<scroll-view :scroll-y="true" style="max-height: 500rpx;">
					<view>

						<view style="overflow: hidden;" class="pp_box">
							<view @click="tj_dj_ren(index)" :class="item.check?'qbpp_as':'qbpp_ac'"
								v-for="(item,index) in yuan_list_arr" :key='index'
								style="height: 70rpx;line-height: 70rpx;border-radius: 35rpx;font-size: 26rpx;float: left;width: 167rpx;box-sizing: border-box;padding: 0 4rpx;text-align: center;"
								class="yihang">
								{{item.title}}
							</view>
						</view>
					</view>

				</scroll-view>
				<view style="overflow: hidden;margin: 20rpx 0;display: flex;">
					<view @click="tj_pp_cz"
						style="flex:1;line-height: 88rpx;text-align: center;border-radius: 44rpx;color: #FFFFFF;background-color: #666666;font-size: 30rpx;float: left">
						重置
					</view>
					<view @click="tj_pp_qd"
						style="flex:1;line-height: 88rpx;text-align: center;border-radius: 44rpx;color: #FFFFFF;background-color: #1fb0ac;font-size: 30rpx;float: right;margin-left: 20rpx;">
						确定
					</view>
				</view>
				<text @click="tj_pp_guanbi" class="iconfont icon-guanbi"
					style="color: #000000;font-size: 28rpx;position: absolute;top:40rpx;right:20rpx;font-weight: 600;">
				</text>
			</view>
		</uni-popup>
		<lb-picker ref="picker" v-model="l_zhiwei" mode="selector" :dataset="{ name: l_zhiwei }" :list="list_arr"
			@confirm="handleConfirm">
		</lb-picker>
		<!-- <lb-picker ref="picker6"
		  v-model="value2"
		  mode="multiSelector"
		  :list="list1"
		  :level="3"
		  :dataset="{ name: 'label2' }"
		  @confirm="handleConfirm4">
		</lb-picker> -->
		<permissionModel ref="permissionModel" />
		<cityPicker :column="column" :default-value="defaultValue" :mask-close-able="maskCloseAble" @confirm="confirm"
			@cancel="cancel" :visible="cityVisible" />
	  <uploadImg :singleNum="true" ref="uploadImg" v-model="uploadImgUrl" permissionCameraContent="获取拍照权限是为了能够上传头像" permissionAlbumContent="获取相册权限，是为了能够上传头像" />
	</view>
</template>

<script>
	import areaData from '@/sub/pages/area-data-min1.js'
	import LbPicker from '@/components/lb-picker'
	import cityPicker from '@/uni_modules/piaoyi-cityPicker/components/piaoyi-cityPicker/piaoyi-cityPicker'
	import { hideMobile } from '@/common/index.js'
	export default {
		components: {
			LbPicker,
			cityPicker
		},
		data() {
			return {
				gender: 0,
				xz: 'https://static-1310167831.cos.ap-nanjing.myqcloud.com/uploads/20230413/943f16f4fdb6405756e166020e160554.png',
				wxz: 'https://static-1310167831.cos.ap-nanjing.myqcloud.com/uploads/20220617/b1c070b010bed630fad61dff384bd6e0.png',
				scrollTop: 0,
				navheight: 0,
				statusBarHeight: 0,
				menuHeight: 0,
				haveBack: false,
				btnHeight: 30,
				btnWidth: 70,
				isScroll: true,
				slotheight: '0',

				address: '',
				province: '',
				city: '',
				district: '',
				uploadImgUrl: '',
				name: '',
				mobile: '',
				mingcheng: '',
				l_zhiwei: '',
				xxaddress: '',
				xu: false,
				yuan_list_arr: [],
				list_arr: [],
				sf_id: '',
				fanwei_list: [],
				qita: '',
				geren: '',
				position: '',

				type_a: 'center',
				xin_list_arr: [],
				xin_id: [],
				gun_code: 1,
				rule: '',
				bgcolor: 'transparent',
				toolcolor: 'transparent',
				cityVisible: false,
				maskCloseAble: true,
				str: '',
				defaultValue: '',
				// defaultValue: ['河北省','唐山市','丰南区'],
				column: 3,
				isUserInfo: 1,
				mobile2: '',
				navTitle: ''
			}
		},
		onReady() {
			// this.$refs.permissionModel.open()
		},
		onLoad(option) {
			// debugger
			console.log('%c [ option ]-334', 'font-size:13px; background:pink; color:#bf2c9f;', option)
			if (option.isUserInfo && Number(option.isUserInfo) === 1) {
				uni.setNavigationBarTitle({
					title: '完善个人信息'
				})
				this.isUserInfo = 1 // 个人信息不完善
				this.navTitle = '个人基本信息'
			} else if (option.isUserInfo && Number(option.isUserInfo) === 2) {
				uni.setNavigationBarTitle({
					title: '个人基本信息'
				})
				this.isUserInfo = 2 // 个人信息完善
				this.navTitle = '完善个人信息'
			}
			this.user_xx()
			this.sflb()
			this.qiandao()
		},
		onShow() {
			this.user_fw()
			this.qita_fanwei()
		},
		methods: {
			hideMobile,
			open() {
				this.cityVisible = true
				this.defaultValue = [this.province, this.city, this.district]
				//   this.$refs.popup.open()
			},
			confirm(val) {
				console.log(val)
				this.cityVisible = false
				this.province = val.provinceName
				this.city = val.cityName
				this.district = val.areaName
				this.address = val.provinceName + '-' + val.cityName + '-' + val.areaName
			},
			cancel() {
				this.cityVisible = false
			},
			login1: function(e) {
				console.log(e)
				let that = this
				// this.$refs.popup1.close()
				uni.login({
					provider: 'weixin',
					success: (code) => {
						console.log(code)
						this.post('api/wechat/phone', {
							code: code.code,
							iv: e.detail.iv,
							encryptedData: e.detail.encryptedData
						}, true).then(res => {
							console.log(res, '123455')
							if (res.code == 1) {
								that.mobile = res.data.phoneNumber
							} else {
								uni.showToast({
									title: res.msg,
									icon: "none",
									duration: 1000
								})
							}

						})
					}
				})
			},

			// 浅到规则
			qiandao: function() {
				this.post('api/index/site', '', true).then(res => {
					console.log(res)
					if (res.code == 1) {
						this.rule = res.data.grxxxy
					}
				})
			},
			gun_switch1Change: function(e) {
				console.log(e)
				if (e.detail.value) {
					this.gun_code = 1
				} else {
					this.gun_code = 0
				}
			},
			tj_dj_ren: function(index) {
				this.yuan_list_arr[index].check = !this.yuan_list_arr[index].check
				this.$forceUpdate()
			},
			tj_pp_cz: function() {
				// this.xin_list_arr=[]
				for (let i = 0; i < this.yuan_list_arr.length; i++) {
					this.yuan_list_arr[i].check = false
				}
				this.$forceUpdate()
			},
			tj_pp_qd: function() {
				this.xin_list_arr = []
				for (let i = 0; i < this.yuan_list_arr.length; i++) {
					if (this.yuan_list_arr[i].check) {
						this.xin_list_arr.push(this.yuan_list_arr[i])
					}
				}
				this.$refs.popup2.close()
			},
			tj_pp_guanbi: function() {
				this.$refs.popup2.close()
			},
			gong: function() {
				this.post('api/client/check_company', {
					company: this.mingcheng
				}, true).then(res => {
					console.log(res)
					if (res.code == 1) {
						if (res.data == 0) {
							uni.showModal({
								title: '提示',
								content: '现在进行公司认证，若无需认证可点击取消',
								success: function(res1) {
									if (res1.confirm) {
										uni.navigateTo({
											url: 'qy_leibie'
										})
									} else if (res1.cancel) {
										// console.log('用户点击取消');
									}
								}
							});
						}
					}
				})

			},
			// 获取用户经营品类
			user_fw: function() {
				this.fanwei_list = []
				this.post('api/client/business_list', '', true).then(res => {
					console.log(res)
					if (res.code == 1) {
						console.log(123445666464)
						this.fanwei_list = res.data
					}
				})
			},
			// 获取其他经营品类
			qita_fanwei: function() {
				this.post('api/client/business_diy_info', '', true).then(res => {
					console.log(res)
					if (res.code == 1) {
						this.qita = res.data.business_scope
					}
				})
			},
			fanwei: function() {
				uni.navigateTo({
					url: '/fenbao/pages/login/fanwei1'
				})
			},
			// 获取用户信息
			user_xx: function() {
				this.post('api/client/info', '', true).then(res => {
					if (res.code == 1) {
						try {
							this.uploadImgUrl = res.data.avatar
							this.name = res.data.name
							this.mobile = res.data.mobile
							this.mobile2 = res.data.mobile
							this.gender = res.data.gender
							this.mingcheng = res.data.company
							this.gun_code = res.data.show_mobile
							let arr = res.data.client_position_arr
							// let arr
							// if (xin_list_arr.includes(',')){
							// 	arr=xin_list_arr.split(',')
							// } else {
							// 	arr= [xin_list_arr]
							// }
							if (Array.isArray(arr) && arr.length) {
								for (let i = 0; i < arr.length; i++) {
									arr[i].check = true
								}
							}
							this.xin_list_arr = arr
							this.xxaddress = res.data.address
							this.geren = res.data.main_remark
							this.position = res.data.position
							if (res.data.province && res.data.city && res.data.area) {
								this.address = res.data.province + '-' + res.data.city + '-' + res.data.area
								this.defaultValue = [res.data.province, res.data.city, res.data.area]
								console.log('%c [ this.address ]-534',
									'font-size:13px; background:pink; color:#bf2c9f;', this.address)
							}

							this.province = res.data.province
							this.city = res.data.city
							this.district = res.data.area
						} catch (error) {
							console.log('%c [ error ]-498', 'font-size:13px; background:pink; color:#bf2c9f;',
								error)

						}
					}
				})
			},
			getSysHeightInfo() {
				const that = this
				let statusBarHeight, menuButtonObject, menuHeight, navheight, haveBack, btnHeight, btnWidth

				statusBarHeight = uni.getSystemInfoSync().statusBarHeight
				//#ifdef MP-WEIXIN
				menuButtonObject = uni.getMenuButtonBoundingClientRect()
				menuHeight = menuButtonObject.height + (menuButtonObject.top - statusBarHeight) * 2
				navheight = menuHeight + statusBarHeight
				btnHeight = menuButtonObject.height
				btnWidth = menuButtonObject.width
				//#endif
				//#ifdef H5
				menuHeight = 44
				navheight = menuHeight + statusBarHeight
				btnHeight = 30
				btnWidth = 70
				//#endif
				if (getCurrentPages().length === 1) { // 当只有一个页面时
					haveBack = false;
				} else {
					haveBack = true;
				}
				that.navheight = navheight
				that.statusBarHeight = statusBarHeight
				that.menuHeight = menuHeight
				that.haveBack = haveBack
			},

			location(e) {
				let that = this
				console.log(e)
				this.province = e.detail.value[0]
				this.city = e.detail.value[1]
				this.district = e.detail.value[2]
				that.address = this.province + '-' + this.city + '-' + this.district
			},
			// 返回
			getTool: function() {
				uni.navigateBack({
					delta: 1
				})
			},
			// 继续
			jixu: function() {
				let xin_id = []
				for (let i = 0; i < this.xin_list_arr.length; i++) {
					if (this.xin_list_arr[i].check) {
						xin_id.push(this.xin_list_arr[i].id)
					}
				}
				let data = {
					avatar: this.uploadImgUrl,
					name: this.name,
					mobile: this.mobile,
					company: this.mingcheng,
					position: this.position,
					gender: this.gender,
					client_position: xin_id.join(','),
					province: this.province,
					city: this.city,
					area: this.district,
					address: this.xxaddress,
					main_remark: this.geren,
					show_mobile: this.gun_code,
				}
				this.post('api/client/update_info', data, true).then(res => {
					console.log('%c [ res ]-623', 'font-size:13px; background:pink; color:#bf2c9f;', res)
					this.xu = true
					if (res.code == 1) {
						if (data.mobile) {
							uni.setStorageSync('mobile', data.mobile)
							uni.setStorageSync('mobile2', data.mobile)
						}
						uni.showToast({
							title: res.msg,
							icon: "none",
							duration: 1000
						})
						this.xu = false
						setTimeout(function() {
							uni.navigateBack({
								delta: 1
							})
						}, 1500)
					} else {
						this.xu = false
						uni.showToast({
							title: res.msg,
							icon: "none",
							duration: 1000
						})
					}

				})

			},
			// 跳过
			tiaoguo: function() {
				uni.navigateTo({
					url: 'hang_xx'
				})
			},
			// 上传图片
			chooseImage() {
				let that = this
				// this.$refs.permissionModel.open()
				this.$refs.uploadImg.open()
			},
			onChooseAvatar: function(e) {
				let that = this
				console.log(e)
				// this.avatarUrl=e.detail.avatarUrl
				uni.uploadFile({
					url: that.BASE_URL + 'addons/cos/index/uploads', //仅为示例，非真实的接口地址
					filePath: e.detail.avatarUrl,
					name: 'file',
					header: {
						token: uni.getStorageSync('token')
					},
					success: (a) => {
						console.log(JSON.parse(a.data))
						let c = JSON.parse(a.data).data.fullurl
						that.uploadImgUrl = c
						// uni.showToast({
						// 	title: '修改成功！',
						// 	icon: "none",
						// 	duration: 1000
						// })
						// that.txxg(c)
						// console.log(that.addimgArray,1234)
					}
				})
			},
			// 身份列表
			sflb: function() {
				let that = this
				this.post('api/firm_data/get_type', '', true).then(res => {
					console.log(res)
					if (res.code == 1) {
						this.yuan_list_arr = res.data
						// for (let i = 0; i < res.data.length; i++) {
						// 	that.list_arr.push(res.data[i].title)
						// }
						for (let i = 0; i < this.yuan_list_arr.length; i++) {
							this.yuan_list_arr[i].check = false
						}
					}
				})
			},
			handleConfirm(e) {
				let that = this
				let index = e.index[0] || e.index
				console.log(index, 123456)
				this.sf_id = this.yuan_list_arr[index].id
			},
			shenfen: function() {
				// this.$refs['picker'].show()
				this.$refs.popup2.open()
				for (let i = 0; i < this.xin_list_arr.length; i++) {
					for (let m = 0; m < this.yuan_list_arr.length; m++) {
						if (!this.yuan_list_arr[m].check) {
							if (this.xin_list_arr[i].id == this.yuan_list_arr[m].id) {
								this.yuan_list_arr[m].check = true

							} else {
								this.yuan_list_arr[m].check = false
							}
						}
					}
				}
				this.$forceUpdate()
			},
			// 性别选择
			tp_lx: function(index) {
				this.gender = index
			},
			rzxz: function() {
				uni.navigateTo({
					url: '/subpages/pages/rzxz?type=' + 4
				})
				return
				this.$refs.popup.open()
			},
			guan: function() {
				this.$refs.popup.close()
			},
		},
		mounted() {
			const that = this
			this.getSysHeightInfo()
			//#ifdef H5
			window.onscroll = function() {
				var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
				if (scrollTop > 1) {
					that.isScroll = true
				} else {
					that.isScroll = false
				}
			}
			//#endif

		},
		watch: {
			scrollTop(newValue, oldValue) {
				//#ifdef MP-WEIXIN
				const that = this
				if (newValue > 1) {
					that.isScroll = true
				} else {
					that.isScroll = false
				}
				//#endif
			}
		}
	}
</script>

<style lang="scss">
	.moren {
		display: flex;
		align-items: center;
		height: 120upx;
		padding: 0 30upx;

		text {
			font-size: 26upx;
			color: #666666;
		}

	}

	.qbpp_ac {
		background-color: #F3F3F3;
		color: #222222;
	}

	.qbpp_as {
		background-color: #1fb0ac;
		color: #FFFFFF;
	}

	.pp_box>view {
		margin-bottom: 14rpx;
		margin-right: 14rpx;
	}

	.pp_box>view:nth-child(4n) {
		// margin-right: 0;
	}

	.avatar-wrapper {
		width: 60rpx;
		height: 60rpx;
		padding: 0;
		float: right;
		margin-top: 20rpx;
		// border-radius: 50%;
	}

	.avatar {
		width: 60rpx;
		height: 60rpx;

		// border-radius: 50%;

	}

	page {
		background-color: #F8F8F8 !important;
		padding-bottom: 30rpx;
		font-family: Demibold;
	}

	.bg {
		width: 100%;
	}

	.box {
		width: 83%;
		position: absolute;
		top: 160rpx;
		left: 50%;
		transform: translateX(-50%);
	}

	.box1 {
		margin-top: 36rpx;
	}

	.wen {
		color: #040200;
		font-size: 48rpx;
		font-weight: 600;

		width: 100%;
	}

	.zi {
		color: #999999;
		font-size: 30rpx;
		margin-top: 30rpx;
	}

	.hang {
		width: 100%;
		padding: 36rpx 0;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.shang {
		position: relative;
		min-width: 160rpx;
		font-size: 28rpx;
	}

	.wan {
		width: 30rpx;
		height: 30rpx;
		position: absolute;
		top: 50%;
		left: 0;
		transform: translateY(-50%);
	}

	.name {
		color: #000;
		font-size: 28rpx;
		font-weight: 600;
	}

	.name_input {
		flex: 1;
		box-sizing: border-box;
		font-size: 28rpx;
		background: transparent;
		height: 40rpx;
		line-height: 40rpx;
		border-radius: 45rpx;
		color: #000000;
		text-align: right;
		padding-right: 10rpx;
	}

	.name_input1 {
		flex: 1;
		box-sizing: border-box;
		font-size: 28rpx;
		background: transparent;
		height: 40rpx;
		line-height: 40rpx;
		border-radius: 45rpx;
		color: #000000;
		text-align: left;
		padding: 0 16rpx 16rpx 12rpx;
	}

	.zhi {
		color: #CCCCCC;
	}

	.input {
		width: 100%;
		box-sizing: border-box;
		// margin-left: 40upx;
		display: flex;
		align-items: center;
		display: flex;
		text-align: right;
		color: #999;

		.picker {
			flex: 1;
			height: 100upx;

			// padding-right: 20upx;
			.change {
				height: 100rpx;
				width: 100%;
				display: flex;
				align-items: center;
				justify-content: space-between;

				image {
					width: 14upx;
					height: 24upx;
				}

				text {
					flex: 1;
					font-size: 30upx;
					padding-right: 20upx;
					color: #333333;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;

				}
			}
		}

		text {
			width: 176upx;
			font-size: 30upx;
			color: #333333;

		}

		input {
			flex: 1;
			font-size: 30upx;
			color: #333333;
		}
	}

	.jixu {
		width: 620rpx;
		height: 90rpx;

		border-radius: 45rpx;
		text-align: center;
		line-height: 90rpx;
		color: #FFFFFF !important;
		font-size: 28rpx;
		margin: 40rpx auto 20rpx;
	}

	.wanshan {
		color: #000000;
		font-size: 22rpx;
		opacity: 0.5;
		line-height: 40rpx;
		text-align: center;
	}

	.tiaoguo {
		width: 160rpx;
		height: 58rpx;
		background: rgba(0, 0, 0, 0.05);
		border: 1px solid #DDDDDD;
		border-radius: 29rpx;
		line-height: 58rpx;
		color: #666666;
		font-size: 24rpx;
		margin: 40rpx auto 20rpx;
		text-align: center;
	}



	// 头部
	.navbar {
		width: 100%;
		overflow: hidden;
		top: 0;
		left: 0;
		z-index: 2;
		flex-shrink: 0;
		color: #fff;
		font-size: 16px;
	}

	.nav-normal {
		position: relative;
	}

	.nav-fixed {
		position: fixed;
	}


	.logo-centent {
		display: flex;
		align-items: center;
	}

	.logo-centent image {
		width: 260rpx;
		height: 68rpx;
		margin-left: 20rpx;
	}

	.hearder-status {
		display: flex;
		align-items: center;
		position: absolute;
		padding-left: 30rpx;
		height: 100%;
		z-index: 99999;

	}

	.header-title {
		height: 100%;
		left: 0;
		right: 0;
		position: absolute;
		margin: auto;
		text-align: center;
	}

	.header-title image {
		position: absolute;
		width: 270rpx;
		height: 35rpx;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}

	.header-title-left {
		height: 100%;
		left: 0;
		right: 0;
		position: absolute;
		margin: auto;
		text-align: left;
	}

	.back-text {
		margin-left: 7px;
		width: 100upx;
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}

	.hearder-status .nav-title-left {
		display: flex;
		justify-content: space-between;
		align-items: center;
		color: rgba(0, 0, 0, .8);
		width: 100%;
		font-weight: bold;
	}

	.hearder-status .nav-btn {
		/* background-color: rgba(255, 255, 255, .5);
		border-radius: 15px; */
		display: flex;
		justify-content: space-between;
		align-items: center;
		color: rgba(0, 0, 0, .8);
		width: 50%;
		font-weight: bold;
	}

	.hearder-status .nav-btn .gotback,
	.hearder-status .nav-btn .gothome {
		flex: 1;
		text-align: center;
		font-size: 18px;
	}

	.Addslot {
		position: absolute;
		width: 100%;
	}

	.shou {
		margin: 0 auto;
		width: 160rpx;
		// width: 200upx;
		border-radius: 10upx;
		font-size: $uni-font-size-sm;
		// padding: 22upx 34upx;
		height: 60upx;
		font-size: 30rpx;
		line-height: 60upx !important;
		// line-height: 1;
		color: #FFFFFF;
		padding: 0;
		font-size: 26rpx;
	}

	.shou:after {
		border: 0;
	}

	.gradient-bg {
		position: relative;
		position: fixed;
		top: 0;
		left: 0;
		width: 100%;
		z-index: -1;
		height: 366rpx;
		background: linear-gradient(180deg, #1fb0ac 0%, #F5F5F5 100%);
		padding-top: 40rpx;
	}

	.right_icon {
		// position: absolute;
		// top: 50%;
		// right: 0;
		// transform: translateY(-50%);
		// width: 15rpx;
		// height: 20rpx;
		// z-index: 11;
	}
</style>